package stream_hub

type CreateWatermarkTaskReq struct {
	TenantId        string          `json:"tenant_id" comment:"租户" validate:"required"`
	Name            string          `json:"name"`
	Input           Input           `json:"input"`
	Output          WatermarkOutput `json:"output"`
	Type            string          `json:"type"`
	CallbackAddress string          `json:"callbackAddress"`
	NgvsaServiceUrl string          `json:"ngvsaServiceUrl"`
	VrcServiceUrl   string          `json:"vrcServiceUrl"`
}

type WatermarkOutput struct {
	Template WatermarkTemplate `json:"template"`
}

type WatermarkTemplate struct {
	TemplateId       string `json:"templateId"`
	Width            int    `json:"width"`
	Height           int    `json:"height"`
	BackgroundWidth  int    `json:"backgroundWidth"`
	BackgroundHeight int    `json:"backgroundHeight"`
	Left             int    `json:"left"`
	Top              int    `json:"top"`
	PictureUrl       string `json:"pictureUrl"`
}

type DeleteWatermarkTaskReq struct {
	TenantId string `json:"tenant_id" comment:"租户" validate:"required"`
	TaskId   string `json:"taskId"`
}

type StartWatermarkTaskReq struct {
	TenantId string `json:"tenant_id" comment:"租户" validate:"required"`
	TaskId   string `json:"taskId"`
}

type StopWatermarkTaskReq struct {
	TenantId string `json:"tenant_id" comment:"租户" validate:"required"`
	TaskId   string `json:"taskId"`
}

type RemoveWatermarkTaskReq struct {
	TenantId string `json:"tenant_id" comment:"租户" validate:"required"`
	TaskId   string `json:"taskId"`
}

type CreateWatermarkTaskRes struct {
	Id                   string          `json:"id"`
	Name                 string          `json:"name"`
	Description          interface{}     `json:"description"`
	Type                 string          `json:"type"`
	Input                WatermarkInput  `json:"input"`
	Output               WatermarkOutput `json:"output"`
	ServiceOutputAddress string          `json:"serviceOutputAddress"`
	Status               string          `json:"status"`
	TenantId             string          `json:"tenantId"`
	CreateTime           int             `json:"createTime"`
	UpdateTime           int             `json:"updateTime"`
	CallbackAddress      string          `json:"callbackAddress"`
}

type WatermarkInput struct {
	Format  string   `json:"format" comment:"输入源格式" validate:"required"`
	Type    string   `json:"type" comment:"推拉流类型" validate:"required"`
	Sources []Source `json:"sources" comment:"源数组"`
	Active  string   `json:"active" comment:"激活源索引"`
	Policy  Policy   `json:"policy" comment:"源切换配置"`
}
